var app = require('../app');

$('#startTime').daterangepicker({ singleDatePicker: true }, function(start, end, label) {
    console.log(start.toISOString(), end.toISOString(), label);
});


$('#endTime').daterangepicker({ singleDatePicker: true }, function(start, end, label) {
    console.log(start.toISOString(), end.toISOString(), label);
});


$('[role-click=filter]').on('click', function(){
    startTime = $('[role-ele=startTime]').val();
    endTime = $('[role-ele=endTime]').val();
    source_type = $('[role-ele=source_type]').val();
    action_type = $('[role-ele=action_type]').val();
    url = "/uaction/record_list?source_type="+source_type+"&action_type="+action_type+"&start_time="+startTime+"&end_time="+endTime;
    window.location.href = url;
})